<?php
/**
 *
 * User: 梁晓伟  lxw11109@gmail.com
 * Date: 2017-11-06
 * Time: 10:41
 */

namespace App\Http\Controllers\Api\V1;


use App\Http\Controllers\Api\V1\Front\Live\ImController;
use App\Http\Controllers\Api\V1\Front\Live\LiveController;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Maatwebsite\Excel\Facades\Excel;


class CodeController extends Controller
{
    public function getCode(Request $request)
    {
        $phone = $request->phone;
        $code = mt_rand(100000, 999999);

        \RedisDB::setex($phone,300,$code);

        return $this->apiResponse($code);
    }
}    